extends "../cTDZ_2/cTDZ_2.gd"
func _info():
	pass

func _connect():
	._connect()

func _extInit():
	._extInit()
	chaName = "骷髅刺客"
	lv = 2
	attCoe.atk = 30 / 8.5 * 2 / 2
	attCoe.maxHp = 580 / 112.5 / 2
	attAdd.cri = 0.1
	addSkillTxt("无惧生死：开局闪现至后排，暴击+10%，普攻消耗自身5%血量额外增加20%真伤")
var hpde = 0.05
var admg = 0.2
func _onAtkChara(atkinfo):
	if !atkinfo.isMiss && atkinfo.atkType == Chara.AtkType.NORMAL && atkinfo.hitCha != self:
		self.plusHp(-att.maxHp*hpde)
		hurtChara(atkinfo.hitCha,atkinfo.hurtVal * admg,Chara.HurtType.REAL,Chara.AtkType.EFF)
	._onAtkChara(atkinfo)

func  _onBattleStart():
	yield(reTimer(0.2),"timeout")
	var mv = Vector2(cell.x ,cell.y)
	if team == 1:mv.x = 7
	else:mv.x = 0
	var vs = [Vector2(0,0),Vector2(1,0),Vector2(-1,0),Vector2(0,1),Vector2(0,-1),Vector2(1,1),Vector2(-1,1),Vector2(-1,-1),Vector2(1,-1)]
	for i in vs:
		var v = mv+i
		if matCha(v) == null && sys.main.isMatin(v):
			if setCell(v) :
				var pos = sys.main.map.map_to_world(cell)
				ying(pos,position)
				position = pos
				aiCha = null
				break
	._onBattleStart()

